
package edu.tongji.jiaowu.dao.jdbc;
 
import java.util.List;

import edu.tongji.jiaowu.dao.EvtStatisticTeacherDao;
import com.tongji.quickCRUDQ.define.Row;
import com.tongji.quickCRUDQ.model.CommonBean;
import com.tongji.quickCRUDQ.dao.jdbc.BaseDaoJdbc;

public class EvtStatisticTeacherDaoJdbc extends BaseDaoJdbc implements EvtStatisticTeacherDao {
	String tableName="T_EVT_STATISTIC_TEACHER";
	String beanName="evtStatisticTeacher";
	
	public CommonBean createEvtStatisticTeacher(){
		CommonBean evtStatisticTeachers=this.createBean(tableName,beanName);
                return evtStatisticTeachers;		
	}
	
/*
	public CommonBean findEvtStatisticTeachers(String refid) {
		CommonBean evtStatisticTeachers=this.createEvtStatisticTeacher();
		String sql="select * from T_EVT_STATISTIC_TEACHER where refid=?";
		List data=this.getCommonDao().select(sql,new String[]{refid});
		evtStatisticTeachers.addData(data);
                return evtStatisticTeachers;
       }
*/
	public CommonBean findEvtStatisticTeacherById(String id) {
		CommonBean evtStatisticTeachers=this.createEvtStatisticTeacher();
		String sql="select * from T_EVT_STATISTIC_TEACHER where id=?";
		List data=this.getCommonDao().select(sql,new String[]{id});
		evtStatisticTeachers.addData(data);
    return evtStatisticTeachers;
  }
  
	public CommonBean findAllEvtStatisticTeachers() {
		CommonBean evtStatisticTeachers=this.createEvtStatisticTeacher();
		String sql="select * from T_EVT_STATISTIC_TEACHER ";
		List data=this.getCommonDao().select(sql,new String[]{});
		evtStatisticTeachers.addData(data);
    return evtStatisticTeachers;
  }
	public void insertEvtStatisticTeacher(CommonBean evtStatisticTeacherBean){
		List data=evtStatisticTeacherBean.getData();
		Row row=this.getRow(tableName);
		this.getCommonDao().templateBatchInsert(row,data,this.getIdGenerator());
	}
	public void updateEvtStatisticTeacher(CommonBean evtStatisticTeacherBean){
		List data=evtStatisticTeacherBean.getData();
		Row row=this.getRow(tableName);
		this.getCommonDao().templateBatchUpdate(row,data);
	}
}

